package com.helloblog.web.functions;

import java.text.SimpleDateFormat;
import java.util.Date;

public class WebFunctions {
	public static String dateFormat(Date date,String layout){
		if(date==null){
			return null;
		}
		if(layout==null||layout.trim().equals("")){
			date.toLocaleString();
		}
		SimpleDateFormat format = new SimpleDateFormat(layout);
		return format.format(date);
	}
}
